package no.mehdi.usereg.rfid.listeners;

import no.mehdi.usereg.core.publisher.SpringEventPublisher;
import no.mehdi.usereg.rfid.events.TagGainEventApp;

import com.phidgets.event.TagGainEvent;
import com.phidgets.event.TagGainListener;


public class TagGainListenerApp implements TagGainListener{
	SpringEventPublisher eventPublisher;


	public void setEventPublisher(SpringEventPublisher eventPublisher) {
		this.eventPublisher = eventPublisher;
	}


	@Override
	public void tagGained(TagGainEvent taggainevent) {
		TagGainEventApp event = new TagGainEventApp(taggainevent.getSource(),taggainevent.getValue());
		eventPublisher.publishEvent(event);
		
	}
	
	

}
